package com.zui.entity.product;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.zui.entity.BaseAutoIdEntity;

@Entity
@Table(name="product_assoc")
public class ProductAssoc extends BaseAutoIdEntity {
	private static final long serialVersionUID = 1L;
	
	private Product product;
	private Product productTo;
	private ProductAssocType productAssocType;
	private Date fromDate;
	private Date thruDate;
	private Integer sequenceNum;
	private Long quantity;
	
	@ManyToOne() @JoinColumn(name="productId")
	public Product getProduct() {
		return product;
	}
	@ManyToOne() @JoinColumn(name="productIdTo")
	public Product getProductTo() {
		return productTo;
	}
	@ManyToOne
	@JoinColumn(name="productAssocTypeId")
	public ProductAssocType getProductAssocType() {
		return productAssocType;
	}
	public Date getFromDate() {
		return fromDate;
	}
	public Date getThruDate() {
		return thruDate;
	}
	public Integer getSequenceNum() {
		return sequenceNum;
	}
	public Long getQuantity() {
		return quantity;
	}
	
	
	
	
	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}
	public void setThruDate(Date thruDate) {
		this.thruDate = thruDate;
	}
	public void setSequenceNum(Integer sequenceNum) {
		this.sequenceNum = sequenceNum;
	}
	public void setQuantity(Long quantity) {
		this.quantity = quantity;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public void setProductTo(Product productTo) {
		this.productTo = productTo;
	}
	public void setProductAssocType(ProductAssocType productAssocType) {
		this.productAssocType = productAssocType;
	}
	
	
}
